package com.benyanyi.loglib;

import android.text.TextUtils;

/**
 * @author myLove
 * @date 2022/11/30 13:21
 * @email ben@yanyi.red
 * @overview
 */
public class LogConfig {
    private String nullTip = "Log with null object";//为空时提示信息
    private String tagDefault = "Jlog";//默认标签
    private String mTag;//标签
    private boolean isShowLog = false;//是否显示log
    private boolean isWrite = false;//是否写入文件夹
    private String writeRootPath = "";//写入文件夹根目录
    private boolean isShowWrite = false;//是否显示log的时候也写入文件夹

    public LogConfig setNullTip(String nullTip) {
        this.nullTip = nullTip;
        return this;
    }

    public LogConfig setTagDefault(String tagDefault) {
        this.tagDefault = tagDefault;
        return this;
    }

    public LogConfig setTag(String mTag) {
        this.mTag = mTag;
        Jlog.mIsGlobalTagEmpty = TextUtils.isEmpty(mTag);
        return this;
    }

    public LogConfig setShowLog(boolean showLog) {
        this.isShowLog = showLog;
        return this;
    }

    public LogConfig setWrite(boolean write) {
        this.isWrite = write;
        return this;
    }

    public LogConfig setWriteRootPath(String writeRootPath) {
        this.writeRootPath = writeRootPath;
        return this;
    }

    public LogConfig setShowWrite(boolean showWrite) {
        this.isShowWrite = showWrite;
        return this;
    }

    String getNullTip() {
        return nullTip;
    }

    String getTagDefault() {
        return tagDefault;
    }

    String getTag() {
        return mTag;
    }

    boolean isShowLog() {
        return isShowLog;
    }

    boolean isWrite() {
        return isWrite;
    }

    String getWriteRootPath() {
        return writeRootPath;
    }

    boolean isShowWrite() {
        return isShowWrite;
    }

}
